﻿Imports System.Collections.ObjectModel

Namespace ViewModel
    Public Class UISettingsViewModel
        Inherits ViewModelBase

        Private _dataGrid As New UISettings.DataGridViewModel
        Public ReadOnly Property DataGrid() As UISettings.DataGridViewModel
            Get
                Return _dataGrid
            End Get
        End Property

#Region "Star"

        ' TODO FilterByStar 0～5 をひとつにまとめる
        'Private _filterByStar As ObservableCollection(Of Boolean)
        'Public ReadOnly Property FilterByStar() As ObservableCollection(Of Boolean)
        '    Get
        '        If _filterByStar Is Nothing Then
        '            _filterByStar = New ObservableCollection(Of Boolean)(New List(Of Boolean)(6))
        '        End If
        '        Return _filterByStar
        '    End Get
        'End Property

        Private _filterByStar5 As Boolean
        Public Property FilterByStar5() As Boolean
            Get
                Return _filterByStar5
            End Get
            Set(ByVal value As Boolean)
                _filterByStar5 = value
                OnPropertyChanged("FilterByStar5")
            End Set
        End Property

        Private _filterByStar4 As Boolean
        Public Property FilterByStar4() As Boolean
            Get
                Return _filterByStar4
            End Get
            Set(ByVal value As Boolean)
                _filterByStar4 = value
                OnPropertyChanged("FilterByStar4")
            End Set
        End Property

        Private _filterByStar3 As Boolean
        Public Property FilterByStar3() As Boolean
            Get
                Return _filterByStar3
            End Get
            Set(ByVal value As Boolean)
                _filterByStar3 = value
                OnPropertyChanged("FilterByStar3")
            End Set
        End Property

        Private _filterByStar2 As Boolean
        Public Property FilterByStar2() As Boolean
            Get
                Return _filterByStar2
            End Get
            Set(ByVal value As Boolean)
                _filterByStar2 = value
                OnPropertyChanged("FilterByStar2")
            End Set
        End Property

        Private _filterByStar1 As Boolean
        Public Property FilterByStar1() As Boolean
            Get
                Return _filterByStar1
            End Get
            Set(ByVal value As Boolean)
                _filterByStar1 = value
                OnPropertyChanged("FilterByStar1")
            End Set
        End Property

        Private _filterByStar0 As Boolean
        Public Property FilterByStar0() As Boolean
            Get
                Return _filterByStar0
            End Get
            Set(ByVal value As Boolean)
                _filterByStar0 = value
                OnPropertyChanged("FilterByStar0")
            End Set
        End Property

        Private _resetFilterByStarCommand As ICommand
        Public ReadOnly Property ResetFilterByStarCommand() As ICommand
            Get
                If _resetFilterByStarCommand Is Nothing Then
                    _resetFilterByStarCommand = New RelayCommand(New Action(Of Object)(AddressOf Me.ResetFilterByStar))
                End If
                Return _resetFilterByStarCommand
            End Get
        End Property

        Private Sub ResetFilterByStar(ByVal obj As Object)
            FilterByStar5 = False
            FilterByStar4 = False
            FilterByStar3 = False
            FilterByStar2 = False
            FilterByStar1 = False
            FilterByStar0 = False

        End Sub

#End Region

        Private _width As Double = 640
        Public Property Width() As Double
            Get
                Return _width
            End Get
            Set(ByVal value As Double)
                _width = value
            End Set
        End Property

        Private _height As Double = 480
        Public Property Height() As Double
            Get
                Return _height
            End Get
            Set(ByVal value As Double)
                _height = value
            End Set
        End Property


        Private _showSearchBar As Boolean
        Public Property ShowSearchBar() As Boolean
            Get
                Return _showSearchBar
            End Get
            Set(ByVal value As Boolean)
                _showSearchBar = value
                OnPropertyChanged("ShowSearchBar")
            End Set
        End Property

        Private _showTagBar As Boolean
        Public Property ShowTagBar() As Boolean
            Get
                Return _showTagBar
            End Get
            Set(ByVal value As Boolean)
                _showTagBar = value
                OnPropertyChanged("ShowTagBar")
            End Set
        End Property

        Private _topmost As Boolean
        Public Property Topmost() As Boolean
            Get
                Return _topmost
            End Get
            Set(ByVal value As Boolean)
                _topmost = value
                OnPropertyChanged("Topmost")
            End Set
        End Property
    End Class

End Namespace
